package Algorithms.ViolenceMatch_04;

/*
 * @Author 罗
 * @date 2020/3/29 - 8:16 下午
 *
 */

public class test {

    public static void main(String[] args) {
        String origin = "硅硅谷 尚硅谷你尚硅 尚硅谷你尚硅谷你尚硅你好";
        String key = "尚硅谷你尚硅你";
        long method1Start = System.currentTimeMillis();
        int index = ViolenceMatches.violenceMatch(origin,key);
        long method1End = System.currentTimeMillis();
        System.out.println(index+"\t方法一耗时"+(method1End-method1Start));
        long method2Start = System.currentTimeMillis();
        int index2 = ViolenceMatches.violenceMatch2(origin,key);
        long method2End = System.currentTimeMillis();
        System.out.println(index2+"\t方法二耗时"+(method2End-method2Start));
    }
}
